package cn.proandcus;

import lombok.extern.slf4j.Slf4j;

/**
 * 生产者 消费者的测试
 */

public class CPTest {
    public static void main(String[] args) {
        Box box=new Box();
        Customer customer=new Customer(box);
        Producer producer=new Producer(box);
        Thread c=new Thread(customer,"消费者1");
        Thread p=new Thread(producer,"生产者");
        Thread x=new Thread(customer,"消费者2");
        p.start();
        c.start();
        x.start();
    }
}
